﻿@using OpenMms.Domain.Models
@model UserInforMations
@{
    Layout = "~/Areas/User/Views/_UserLayout.cshtml";
}

<!-- APP MAIN ==========-->
<main id="app-main" class="app-main">
    <div class="wrap">
        <section class="app-content">
            <div class="row">
                <div class="col-md-6 col-sm-6">
                    <div class="widget p-md clearfix">
                        <div class="pull-left">
                            <h3 class="widget-title">欢迎光临OpenMms</h3>
                            <small class="text-color"><span>会员级别：@Model.LevelName</span></small>
                            <small class="text-color">
                                @switch (Model.ManagerLevel)
                                {
                                    case 0:<span>管理级别：业务员</span>; break;
                                    case 1:<span>管理级别：经理</span>; break;
                                    case 2:<span>管理级别：总监</span>; break;
                                    case 3:<span>管理级别：董事</span>; break;

                                }
                            </small>
                        </div>
                        <span class="pull-right fz-lg fw-500 counter" data-plugin="counterUp"></span>
                    </div><!-- .widget -->
                </div>

                <div class="col-md-6 col-sm-6">
                    <div class="widget p-md clearfix">
                        <div class="pull-left">
                            <h3 class="widget-title">团队人数</h3>
                            <small class="text-color">active number</small>
                        </div>
                        <span class="pull-right fz-lg fw-500 counter" data-plugin="counterUp">@(Model.LeftCount + Model.RightCount)</span>
                    </div><!-- .widget -->
                </div>
            </div><!-- .row -->

            <div class="row">
                <div class="col-md-3 col-sm-6">
                    <div class="widget stats-widget">
                        <div class="widget-body clearfix">
                            <div class="pull-left">
                                <h3 class="widget-title text-primary"><span class="counter" data-plugin="counterUp">@Model.RealMoney</span>元</h3>
                                <small class="text-color">奖金</small>
                            </div>
                            <span class="pull-right big-icon watermark"><i class="fa fa-bar-chart"></i></span>
                        </div>
                        <footer class="widget-footer bg-primary">
                            <small>% charge</small>
                            <span class="small-chart pull-right" data-plugin="sparkline" data-options="[4,3,5,2,1], { type: 'bar', barColor: '#ffffff', barWidth: 5, barSpacing: 2 }"></span>
                        </footer>
                    </div><!-- .widget -->
                </div>

                <div class="col-md-3 col-sm-6">
                    <div class="widget stats-widget">
                        <div class="widget-body clearfix">
                            <div class="pull-left">
                                <h3 class="widget-title text-danger"><span class="counter" data-plugin="counterUp">@Model.RefereeCount</span>人</h3>
                                <small class="text-color">推荐数量</small>
                            </div>
                            <span class="pull-right big-icon watermark"><i class="fa fa-list-ol"></i></span>
                        </div>
                        <footer class="widget-footer bg-danger">
                            <small>% charge</small>
                            <span class="small-chart pull-right" data-plugin="sparkline" data-options="[1,2,3,5,4], { type: 'bar', barColor: '#ffffff', barWidth: 5, barSpacing: 2 }"></span>
                        </footer>
                    </div><!-- .widget -->
                </div>

                <div class="col-md-3 col-sm-6">
                    <div class="widget stats-widget">
                        <div class="widget-body clearfix">
                            <div class="pull-left">
                                <h3 class="widget-title text-success"><span class="counter" data-plugin="counterUp">@Model.LeftAchie</span>元</h3>
                                <small class="text-color">左区业绩</small>
                            </div>
                            <span class="pull-right big-icon watermark"><i class="fa fa-ils"></i></span>
                        </div>
                        <footer class="widget-footer bg-success">
                            <small>% charge</small>
                            <span class="small-chart pull-right" data-plugin="sparkline" data-options="[2,4,3,4,3], { type: 'bar', barColor: '#ffffff', barWidth: 5, barSpacing: 2 }"></span>
                        </footer>
                    </div><!-- .widget -->
                </div>

                <div class="col-md-3 col-sm-6">
                    <div class="widget stats-widget">
                        <div class="widget-body clearfix">
                            <div class="pull-left">
                                <h3 class="widget-title text-warning"><span class="counter" data-plugin="counterUp">@Model.RightAchie</span>元</h3>
                                <small class="text-color">右区业绩</small>
                            </div>
                            <span class="pull-right big-icon watermark"><i class="fa fa-pie-chart"></i></span>
                        </div>
                        <footer class="widget-footer bg-warning">
                            <small>% charge</small>
                            <span class="small-chart pull-right" data-plugin="sparkline" data-options="[5,4,3,5,2],{ type: 'bar', barColor: '#ffffff', barWidth: 5, barSpacing: 2 }"></span>
                        </footer>
                    </div><!-- .widget -->
                </div>
            </div><!-- .row -->

            <div class="row">
                <div class="col-md-7 col-sm-7">
                    <div class="widget">
                        <header class="widget-header">
                            <h4 class="widget-title">网站公告</h4>
                        </header>
                        <hr class="widget-separator" />
                        <div class="widget-body padding-tb">
                            <div class="streamline">
                                @{var notice = ViewBag.Notice as SortedList<int, Notice>;}
                                @{ string type = "";}
                                @foreach (KeyValuePair<int, Notice> obj in notice)
                                {

                                    switch (obj.Key)
                                    {
                                        case 0: type = "sl-primary"; break;
                                        case 1: type = "sl-danger"; break;
                                        case 2: type = "sl-success"; break;
                                        case 3: type = "sl-warning"; break;
                                        case 4: type = "sl-primary"; break;
                                    }
                                    <div class="sl-item @type">
                                        <div class="sl-content">
                                            <small class="text-muted">@obj.Value.CreateDate</small>
                                            <p style="cursor:pointer" onclick="gotoNotice(@obj.Value.Id)">@obj.Value.Title</p>
                                        </div>
                                    </div>
                                }
                            </div><!-- .streamline -->
                        </div>
                    </div><!-- .widget -->
                </div>
                <div class="col-md-5">
                    <div class="widget todo-widget">
                        <header class="widget-header">
                            <h4 class="widget-title">Todo List</h4>
                        </header>
                        <hr class="widget-separator" />
                        <div class="widget-body p-b-0">
                            <ul class="todo-list">
                                <li class="todo-item">
                                    <div class="checkbox checkbox-default">
                                        <input type="checkbox" id="checkbox02" />
                                        <label for="checkbox02">Record The First Episode Of HTML Tutorial</label>
                                    </div>
                                </li><!-- .todo-item -->

                                <li class="todo-item">
                                    <div class="checkbox checkbox-pink">
                                        <input type="checkbox" id="checkbox2" />
                                        <label for="checkbox2">Prepare The Conference Schedule</label>
                                    </div>
                                </li><!-- .todo-item -->

                                <li class="todo-item">
                                    <div class="checkbox checkbox-warning">
                                        <input type="checkbox" id="checkbox4" checked />
                                        <label for="checkbox4">Decide The Live Discussion Time</label>
                                    </div>
                                </li><!-- .todo-item -->

                                <li class="todo-item">
                                    <div class="checkbox checkbox-success">
                                        <input type="checkbox" id="checkbox3" checked />
                                        <label for="checkbox3">Prepare For The Next Project</label>
                                    </div>
                                </li><!-- .todo-item -->

                                <li class="todo-item">
                                    <div class="checkbox checkbox-danger">
                                        <input type="checkbox" id="checkbox5" checked />
                                        <label for="checkbox5">Finish Up AngularJs Tutorial</label>
                                    </div>
                                </li><!-- .todo-item -->

                                <li class="todo-item">
                                    <div class="checkbox checkbox-purple">
                                        <input type="checkbox" id="checkbox1" checked />
                                        <label for="checkbox1">Finish Infinity Project</label>
                                    </div>
                                </li><!-- .todo-item -->
                            </ul><!-- .todo-list -->
                        </div>
                        <div class="new-todo">
                            <input type="text" placeholder="add new task" />
                        </div>
                        <footer class="widget-footer">
                            <a href="javascript:void(0)" class="btn btn-sm btn-success m-r-md">All</a>
                            <a href="javascript:void(0)" class="btn btn-sm btn-default">Archive</a>
                            <a href="javascript:void(0)" class="btn btn-sm btn-default pull-right">Clear completed</a>
                        </footer>
                    </div><!-- .widget -->
                </div>
            </div><!-- .row -->
        </section><!-- #dash-content -->
    </div><!-- .wrap -->
    <!-- APP FOOTER -->
    <div class="wrap p-t-0">
        <footer class="app-footer">
            <div class="clearfix">
                <div class="copyright text-center w100">@OpenMms.Common.Url.NameConfig.companyName &copy;</div>
            </div>
        </footer>
    </div>
    <!-- /#app-footer -->
</main>
<!--========== END app main -->
<script>
    function gotoNotice(id) {
        window.location.href = "/User/Notice/NoticeInfo?id="+id;
    }
</script>


